import 'dart:ui';

import 'package:airbnb_clone/constant/constant.dart';
import 'package:flutter/material.dart';
import 'package:go_router/go_router.dart';

class LoginCheckDialog {
  LoginCheckDialog._();

  static void loginDialog(BuildContext context) {
    showDialog(
      context: context,
      builder: (context) => GestureDetector(
        child: Center(
          child: BackdropFilter(
            filter: ImageFilter.blur(sigmaX: 5.0, sigmaY: 5.0),
            child: Container(
              height: 195,
              width: 300,
              padding: const EdgeInsets.fromLTRB(20, 10, 20, 10),
              decoration: BoxDecoration(
                  color: Colors.white,
                  borderRadius: BorderRadius.circular(20)),
              child: Column(
                mainAxisAlignment: MainAxisAlignment.center,
                children: [
                  Text(
                    "用户未登录",
                    style: titleTextStyle,
                  ),
                  Row(
                    mainAxisAlignment: MainAxisAlignment.center,
                    children: [
                      TextButton(
                        onPressed: () {
                          Navigator.pop(context);
                        },
                        style: normalButtonStyle,
                        child: Text(
                          "取消",
                          style: normalTextStyle,
                        ),
                      ),
                      TextButton(
                        onPressed: () {
                          context.pushNamed("login");
                        },
                        style: normalButtonStyle,
                        child: Text(
                          "点击登录",
                          style: normalTextStyle,
                        ),
                      ),
                    ],
                  )
                ],
              ),
            ),
          ),
        ),
      ),
    );
  }


}
